import React, { Component } from 'react';
import {
  StyleSheet, Text, View, Image, ScrollView,
} from 'react-native';
import ZlstIcon from '../components/zlst-icons';
import theme from '../native-base-theme/variables';

class Share extends Component {
  static navigationOptions = {
    title: '分享',
    headerStyle: { backgroundColor: theme.toolbarDefaultBg, borderBottomWidth: 0, elevation: 0 },
    headerTintColor: '#FFFFFF',
    headerTitleStyle: {
      fontWeight: 'bold',
      fontSize: 20,
      flex: 1,
      textAlign: 'center',
    },
    headerBackImage: (
      <ZlstIcon
        name="fanhui"
        size={24}
        color="white"
      />
    ),
    headerRight: <View />,
  }

  render() {
    return (
      <ScrollView style={{ flex: 1, backgroundColor: '#fff' }}>
        <View style={styles.container}>
          <Text style={styles.title}>安卓APP二维码:</Text>
          <Image
            style={styles.image}
            source={require('../../assets/images/rxsb-android.png')}
          />
          <Text style={styles.title}>苹果APP二维码：</Text>
          <Image
            style={styles.image}
            source={require('../../assets/images/rxsb-ios.png')}
          />
        </View>
      </ScrollView>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'column',
    padding: 8,
  },
  title: {
    color: 'black',
    fontSize: 17,
    marginTop: 8,
  },
  image: {
    width: 200,
    height: 200,
    alignSelf: 'center',
    marginTop: 8
  },
});

export default Share;
